package com.ruoyi.buss.grid.zysc.service.impl;

import java.util.List;

import com.ruoyi.buss.grid.zysc.domain.DataWgZyscKh;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.buss.grid.zysc.mapper.DataWgZyscKhMapper;
import com.ruoyi.buss.grid.zysc.service.IDataWgZyscKhService;

/**
 * 专业市场客户Service业务层处理
 * 
 * @author sxy
 * @date 2021-07-16
 */
@Service
public class DataWgZyscKhServiceImpl implements IDataWgZyscKhService 
{
    @Autowired
    private DataWgZyscKhMapper dataWgZyscKhMapper;

    /**
     * 查询专业市场客户
     * 
     * @param id 专业市场客户ID
     * @return 专业市场客户
     */
    @Override
    public DataWgZyscKh selectDataWgZyscKhById(String id)
    {
        return dataWgZyscKhMapper.selectDataWgZyscKhById(id);
    }

    /**
     * 查询专业市场客户列表
     * 
     * @param dataWgZyscKh 专业市场客户
     * @return 专业市场客户
     */
    @Override
    public List<DataWgZyscKh> selectDataWgZyscKhList(DataWgZyscKh dataWgZyscKh)
    {
        return dataWgZyscKhMapper.selectDataWgZyscKhList(dataWgZyscKh);
    }

    /**
     * 新增专业市场客户
     * 
     * @param dataWgZyscKh 专业市场客户
     * @return 结果
     */
    @Override
    public int insertDataWgZyscKh(DataWgZyscKh dataWgZyscKh)
    {
        dataWgZyscKh.setCreateTime(DateUtils.getNowDate());
        return dataWgZyscKhMapper.insertDataWgZyscKh(dataWgZyscKh);
    }

    /**
     * 修改专业市场客户
     * 
     * @param dataWgZyscKh 专业市场客户
     * @return 结果
     */
    @Override
    public int updateDataWgZyscKh(DataWgZyscKh dataWgZyscKh)
    {
        dataWgZyscKh.setUpdateTime(DateUtils.getNowDate());
        return dataWgZyscKhMapper.updateDataWgZyscKh(dataWgZyscKh);
    }

    /**
     * 批量删除专业市场客户
     * 
     * @param ids 需要删除的专业市场客户ID
     * @return 结果
     */
    @Override
    public int deleteDataWgZyscKhByIds(String[] ids)
    {
        return dataWgZyscKhMapper.deleteDataWgZyscKhByIds(ids);
    }

    /**
     * 删除专业市场客户信息
     * 
     * @param id 专业市场客户ID
     * @return 结果
     */
    @Override
    public int deleteDataWgZyscKhById(String id)
    {
        return dataWgZyscKhMapper.deleteDataWgZyscKhById(id);
    }
}
